﻿
//Author: 张亚涛
//createtime:2015-12-24 09:55:58
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    public class Price
    {
        public Price()
        { }
        public Price(IDataReader reader)
        {
            _id = int.Parse(reader["ID"].ToString());
            if (reader["PriceType"] != DBNull.Value)
            {
                _priceType = reader["PriceType"].ToString();
            }
            if (reader["OutPrice"] != DBNull.Value)
            {
                _outPrice = decimal.Parse(reader["OutPrice"].ToString());
            }
            if (reader["InPrice"] != DBNull.Value)
            {
                _inPrice = decimal.Parse(reader["InPrice"].ToString());
            }
        }

        #region 数据库字段
        private int? _id;
        private string _priceType;
        private decimal? _outPrice;
        private decimal? _inPrice;
        #endregion

        #region 字段属性
        /// <summary>
        /// 主键
        /// </summary>
        public int? Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 价格分类
        /// </summary>
        public string PriceType
        {
            set { _priceType = value; }
            get { return _priceType; }
        }
        /// <summary>
        /// 外观
        /// </summary>
        public decimal? OutPrice
        {
            set { _outPrice = value; }
            get { return _outPrice; }
        }
        /// <summary>
        /// 外观+内饰
        /// </summary>
        public decimal? InPrice
        {
            set { _inPrice = value; }
            get { return _inPrice; }
        }
        #endregion
    }
}